home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / game / think / AmiChess.lha / AmiChess / src / eval.h < prev    next >
C/C++ Source or Header  |  2002-10-13  |  3KB  |  119 lines

  1. /* GNU Chess 5.0 - eval.h - evaluation symbolic definitions
  2.    Copyright (c) 1999 Free Software Foundation, Inc.
  3.  
  4.    GNU Chess is based on the two research programs 
  5.    Cobalt by Chua Kong-Sian and Gazebo by Stuart Cracraft.
  6.  
  7.    GNU Chess is free software; you can redistribute it and/or modify
  8.    it under the terms of the GNU General Public License as published by
  9.    the Free Software Foundation; either version 2, or (at your option)
  10.    any later version.
  11.  
  12.    GNU Chess is distributed in the hope that it will be useful,
  13.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.    GNU General Public License for more details.
  16.  
  17.    You should have received a copy of the GNU General Public License
  18.    along with GNU Chess; see the file COPYING.  If not, write to
  19.    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  20.    Boston, MA 02111-1307, USA.
  21.  
  22.    Contact Info: 
  23.      bug-gnu-chess@gnu.org
  24.      cracraft@ai.mit.edu, cracraft@stanfordalumni.org, cracraft@earthlink.net
  25. */
  26.  
  27. #ifndef EVAL_H
  28. #define EVAL_H
  29.  
  30. /****************************************************************************
  31.  *
  32.  *  The various evaluations constants.
  33.  *
  34.  ****************************************************************************/
  35.  
  36. #define OPENING         (phase <= 2)
  37. #define ENDING       (phase >= 6)
  38. #define TRADEPIECE   4
  39. #define TRADEPAWNS   8
  40. #define HUNGPENALTY  -8
  41. #define ROOKMOVED    -20
  42. #define KINGMOVED    -20
  43. #define NOTCASTLED   -8
  44. #define PFACTOR      550
  45. #define EARLYMINORREPEAT -7
  46.  
  47. /***********/
  48. /*  Pawns  */
  49. /***********/
  50. #define EIGHT_PAWNS    -10
  51. #define STONEWALL    -10
  52. #define LOCKEDPAWNS    -10
  53. #define EARLYWINGPAWNMOVE -6
  54. #define EARLYCENTERPREPEAT -6
  55. #define BACKWARDPAWN   -(8+phase)
  56. #define DOUBLEDPAWN    -(8+phase)
  57. #define PAWNBASEATAK   -18
  58. #define BLOCKDEPAWN    -48 /* -12 */
  59. #define CONNECTEDPP    50
  60. #define PAWNNEARKING    40
  61. #define ATAKWEAKPAWN    2
  62. #define FIANCHETTO_TARGET -13
  63.  
  64.  
  65. /*************/
  66. /*  Knights  */
  67. /*************/
  68. #define KNIGHTONRIM    -13
  69. #define    OUTPOSTKNIGHT    10
  70. #define PINNEDKNIGHT    -3
  71. #define KNIGHTTRAPPED   -250
  72.  
  73.  
  74. /*************/
  75. /*  Bishops  */
  76. /*************/
  77. #define DOUBLEDBISHOPS  18
  78. #define    OUTPOSTBISHOP    8
  79. #define FIANCHETTO     8
  80. #define GOODENDINGBISHOP 16
  81. #define BISHOPTRAPPED   -250
  82. #define PINNEDBISHOP    -8
  83.  
  84. /***********/
  85. /*  Rooks  */
  86. /***********/
  87. #define    ROOK7RANK      30
  88. #define ROOKS7RANK     30
  89. #define ROOKHALFFILE   5
  90. #define ROOKOPENFILE   6
  91. #define ROOKBEHINDPP   6
  92. #define ROOKINFRONTPP -10
  93. #define PINNEDROOK    -6
  94. #define ROOKTRAPPED   -10
  95. #define ROOKLIBERATED 40
  96.  
  97. /***********/
  98. /*  Queen  */
  99. /***********/
  100. #define EARLYQUEENMOVE  -40
  101. #define QUEENNEARKING   12
  102. #define PINNEDQUEEN    -8
  103. #define QUEEN_NOT_PRESENT -25
  104.  
  105. /**********/
  106. /*  King  */
  107. /**********/
  108. #define KINGOPENFILE  -10
  109. #define KINGOPENFILE1 -6
  110. #define ATAKKING       10
  111. #define DEFENDKING     6
  112. #define HOPEN          -600
  113. #define GOPEN          -30
  114. #define KING_DEFENDER_DEFICIT -50
  115. #define KING_BACK_RANK_WEAK -40
  116. #define RUPTURE -20
  117.  
  118. #endif /* !EVAL_H */
  119.